home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / ATA.a < prev    next >
Encoding:
Text File  |  1996-05-06  |  50.8 KB  |  879 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ATA.a
  3. ;
  4. ;    Contains:    ATA (PC/AT Attachment) Interfaces
  5. ;
  6. ;    Version:    System 7.5
  7. ;                Package:    Universal Interfaces 2.2.1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.     IF &TYPE('__ATA__') = 'UNDEFINED' THEN
  20. __ATA__ SET 1
  21.  
  22.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  23.     include 'Types.a'
  24.     ENDIF
  25.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  26.     include 'MixedMode.a'
  27.     ENDIF
  28.  
  29. ;  This is the structure used for the AT Interface core routines below 
  30.  
  31. kATATrap                        EQU        $AAF1                ; Manager trap number <This should be defined in Traps.h>
  32. kATAPBVers1                        EQU        $01                    ; parameter block version number 1
  33. kATAPBVers2                        EQU        $02                    ; parameter block version number for structures
  34. kATAPBVers3                        EQU        $03                    ; parameter block version for ATA times
  35. kATADefaultBlockSize            EQU        512                    ; default block size
  36. ;  Used to determine the presence of traps
  37.  
  38. kFSMTrap                        EQU        $AC
  39. mDQEChanged                        EQU        1                    ; DQE has changed 
  40. ;  Task file definition ••• Error Register •••
  41.  
  42. bATABadBlock                    EQU        7                    ; bit number of bad block error bit
  43. bATAUncorrectable                EQU        6                    ; bit number of uncorrectable error bit
  44. bATAMediaChanged                EQU        5                    ; bit number of media changed indicator
  45. bATAIDNotFound                    EQU        4                    ; bit number of ID not found error bit
  46. bATAMediaChangeReq                EQU        3                    ; bit number of media changed request
  47. bATACommandAborted                EQU        2                    ; bit number of command abort bit
  48. bATATrack0NotFound                EQU        1                    ; bit number of track not found
  49. bATAAddressNotFound                EQU        0                    ; bit number of address mark not found
  50. mATABadBlock                    EQU        $80                    ; Bad Block Detected
  51. mATAUncorrectable                EQU        $40                    ; Uncorrectable Data Error
  52. mATAMediaChanged                EQU        $20                    ; Media Changed Indicator (for removable)
  53. mATAIDNotFound                    EQU        $10                    ; ID Not Found
  54. mATAMediaChangeReq                EQU        $08                    ; Media Change Requested (NOT IMPLEMENTED)
  55. mATACommandAborted                EQU        $04                    ; Aborted Command
  56. mATATrack0NotFound                EQU        $02                    ; Track 0 Not Found
  57. mATAAddressNotFound                EQU        $01                    ; Address Mark Not Found
  58. ;  Task file definition ••• ataTFSDH Register •••
  59.  
  60. mATAHeadNumber                    EQU        $0F                    ; Head Number (bits 0-3) 
  61. mATASectorSize                    EQU        $A0                    ; bit 7=1; bit 5 = 01 (512 sector size) <DP4>
  62. mATADriveSelect                    EQU        $10                    ; Drive (0 = master, 1 = slave) 
  63. mATALBASelect                    EQU        $40                    ; LBA mode bit (0 = chs, 1 = LBA)
  64. ;  Task file definition ••• Status Register •••
  65.  
  66. bATABusy                        EQU        7                    ; bit number of BSY bit
  67. bATADriveReady                    EQU        6                    ; bit number of drive ready bit
  68. bATAWriteFault                    EQU        5                    ; bit number of write fault bit
  69. bATASeekComplete                EQU        4                    ; bit number of seek complete bit
  70. bATADataRequest                    EQU        3                    ; bit number of data request bit
  71. bATADataCorrected                EQU        2                    ; bit number of data corrected bit
  72. bATAIndex                        EQU        1                    ; bit number of index mark
  73. bATAError                        EQU        0                    ; bit number of error bit
  74. mATABusy                        EQU        $80                    ; Unit is busy
  75. mATADriveReady                    EQU        $40                    ; Unit is ready
  76. mATAWriteFault                    EQU        $20                    ; Unit has a write fault condition
  77. mATASeekComplete                EQU        $10                    ; Unit seek complete
  78. mATADataRequest                    EQU        $08                    ; Unit data request
  79. mATADataCorrected                EQU        $04                    ; Data corrected
  80. mATAIndex                        EQU        $02                    ; Index mark - NOT USED
  81. mATAError                        EQU        $01                    ; Error condition - see error register
  82. ;  ATA Command Opcode definition
  83.  
  84. kATAcmdWORetry                    EQU        $01                    ; Without I/O retry option
  85. kATAcmdNOP                        EQU        $0000                ; NOP operation - media detect
  86. kATAcmdRecal                    EQU        $0010                ; Recalibrate command 
  87. kATAcmdRead                        EQU        $0020                ; Read command 
  88. kATAcmdReadLong                    EQU        $0022                ; Read Long command
  89. kATAcmdWrite                    EQU        $0030                ; Write command 
  90. kATAcmdWriteLong                EQU        $0032                ; Write Long
  91. kATAcmdReadVerify                EQU        $0040                ; Read Verify command 
  92. kATAcmdFormatTrack                EQU        $0050                ; Format Track command 
  93. kATAcmdSeek                        EQU        $0070                ; Seek command 
  94. kATAcmdDiagnostic                EQU        $0090                ; Drive Diagnostic command 
  95. kATAcmdInitDrive                EQU        $0091                ; Init drive parameters command 
  96. kATAcmdReadMultiple                EQU        $00C4                ; Read multiple
  97. kATAcmdWriteMultiple            EQU        $00C5                ; Write multiple
  98. kATAcmdSetRWMultiple            EQU        $00C6                ; Set Multiple for Read/Write Multiple
  99. kATAcmdReadDMA                    EQU        $00C8                ; Read DMA (with retries)
  100. kATAcmdWriteDMA                    EQU        $00CA                ; Write DMA (with retries)
  101. kATAcmdMCAcknowledge            EQU        $00DB                ; Acknowledge media change - removable
  102. kATAcmdStandbyImmed                EQU        $00E0                ; Standby Immediate
  103. kATAcmdIdleImmed                EQU        $00E1                ; Idle Immediate
  104. kATAcmdStandby                    EQU        $00E2                ; Standby
  105. kATAcmdIdle                        EQU        $00E3                ; Idle
  106. kATAcmdReadBuffer                EQU        $00E4                ; Read sector buffer command 
  107. kATAcmdCheckPowerMode            EQU        $00E5                ; Check power mode command    <04/04/94>
  108. kATAcmdSleep                    EQU        $00E6                ; Sleep
  109. kATAcmdWriteBuffer                EQU        $00E8                ; Write sector buffer command 
  110. kATAcmdDriveIdentify            EQU        $00EC                ; Identify Drive command 
  111. kATAcmdSetFeatures                EQU        $00EF                ; Set Features
  112. ;  Set feature command opcodes
  113.  
  114. kATAEnableWriteCache            EQU        $02                    ;        Enable write cache
  115. kATASetTransferMode                EQU        $03                    ;        Set transfer mode
  116. kATASetPIOMode                    EQU        $08                    ;        PIO Flow Control Tx Mode bit
  117. kATAEnableECC                    EQU        $88                    ;        ECC enable
  118. kATAEnableRetry                    EQU        $99                    ;        Retry enable
  119. kATAEnableReadAhead                EQU        $AA                    ;        Read look-ahead enable
  120. ;  ATA Device ID codes
  121.  
  122. kATAInvalidDeviceID                EQU        -1
  123. kATAMasterDeviceID                EQU        0
  124. kATASlaveDeviceID                EQU        1
  125. ;  Device Register Images  (8 bytes) 
  126. ataTaskFile                RECORD 0
  127. ataTFFeatures             ds.b    1                ; offset: $0 (0)        ;  <-> Error(R) or ataTFFeatures(W) register image 
  128. ataTFCount                 ds.b    1                ; offset: $1 (1)        ;  <-> Sector count/remaining 
  129. ataTFSector                 ds.b    1                ; offset: $2 (2)        ;  <-> Sector start/finish 
  130. ataTFReserved             ds.b    1                ; offset: $3 (3)        ;  reserved                    
  131. ataTFCylinder             ds.w    1                ; offset: $4 (4)        ;  <-> ataTFCylinder (Big endian) 
  132. ataTFSDH                 ds.b    1                ; offset: $6 (6)        ;  <-> ataTFSDH register image
  133. ataTFCommand             ds.b    1                ; offset: $7 (7)        ;  <-> Status(R) or Command(W) register image 
  134. sizeof                     EQU *                    ; size:   $8 (8)
  135.                         ENDR
  136. ;  ATA Manager Function Code Definition
  137.  
  138. kATAMgrNOP                        EQU        $00                    ; No Operation
  139. kATAMgrExecIO                    EQU        $01                    ; Execute ATA I/O
  140. kATAMgrBusInquiry                EQU        $03                    ; Bus Inquiry
  141. kATAMgrQRelease                    EQU        $04                    ; I/O Queue Release
  142. kATAMgrAbort                    EQU        $10                    ; Abort command
  143. kATAMgrBusReset                    EQU        $11                    ; Reset ATA bus
  144. kATAMgrRegAccess                EQU        $12                    ; Register Access
  145. kATAMgrDriveIdentify            EQU        $13                    ; Drive Identify            <DP03/10/94>
  146. kATAMgrDriverLoad                EQU        $82                    ; Load driver from either Media, ROM, etc.
  147. kATAMgrDriveRegister            EQU        $85                    ; Register a driver        <4/18/94>
  148. kATAMgrFindDriverRefnum            EQU        $86                    ; lookup a driver refnum    <4/18/94>
  149. kATAMgrRemoveDriverRefnum        EQU        $87                    ; De-register a driver    <4/18/94>
  150. kATAMgrModifyEventMask            EQU        $88                    ; Modify driver event mask
  151. kATAMgrDriveEject                EQU        $89                    ; Eject the drive        <8/1/94>
  152. kATAMgrGetDrvConfiguration        EQU        $8A                    ; Get device configuration    <8/6/94>
  153. kATAMgrSetDrvConfiguration        EQU        $8B                    ; Set device configuration <8/6/94>
  154. kATAMgrGetLocationIcon            EQU        $8C                    ; Get card location icon    <SM4>
  155. kATAMgrManagerInquiry            EQU        $90                    ; Manager Inquiry
  156. kATAMgrManagerInit                EQU        $91                    ; Manager initialization
  157. kATAMgrManagerShutdown            EQU        $92                    ; Manager ShutDown
  158. ;  'ATAFlags' field of the PB header definition
  159.  
  160. bATAFlagUseConfigSpeed            EQU        15                    ; bit number of use default speed flag
  161. bATAFlagByteSwap                EQU        14                    ; bit number of byte swap flag
  162. bATAFlagIORead                    EQU        13                    ; bit number of I/O read flag
  163. bATAFlagIOWrite                    EQU        12                    ; bit number of I/O write flag
  164. bATAFlagImmediate                EQU        11                    ; bit number of immediate flag
  165. bATAFlagQLock                    EQU        10                    ; bit number of que lock on error
  166. bATAFlagScatterGather1            EQU        9                    ; bit number of scatter gather
  167. bATAFlagScatterGather0            EQU        8                    ; bit numbers of scatter gather
  168. bATAFlagUseDMA                    EQU        7                    ; bit number of use DMA flag
  169. bATAFlagProtocol1                EQU        5                    ; bit number of scatter gather
  170. bATAFlagProtocol0                EQU        4                    ; bit numbers of protocol specifier
  171. bATAFlagTFRead                    EQU        3                    ; bit number of register update
  172. bATAFlagLEDEnable                EQU        0                    ; bit number of LED enable
  173. mATAFlagUseConfigSpeed            EQU        $8000
  174. mATAFlagByteSwap                EQU        $4000                ; Swap data bytes (read - after; write - before)
  175. mATAFlagIORead                    EQU        $2000                ; Read (in) operation
  176. mATAFlagIOWrite                    EQU        $1000                ; Write (out) operation
  177. mATAFlagImmediate                EQU        $0800                ; Head of Que; Immediate operation
  178. mATAFlagQLock                    EQU        $0400                ; Manager queue lock on error (freeze the queue)
  179. mATAFlagScatterGather1            EQU        $0200
  180. mATAFlagScatterGather0            EQU        $0100                ; Scatter gather enable
  181. mATAFlagScatterGathers            EQU        $0300                ; host scatter gather type = currently type 1 supported
  182. mATAFlagUseDMA                    EQU        $80
  183. mATAFlagProtocol1                EQU        $20                    ; ATAPI protocol indicator <06/15/94>
  184. mATAFlagProtocol0                EQU        $10                    ; PCMCIA protocol indicator <06/15/94>
  185. mATAFlagProtocols                EQU        $30                    ; mask for protocol type field    <06/15/94>
  186. mATAFlagTFRead                    EQU        $08                    ; update reg block request upon detection of an error
  187. mATAFlagLEDEnable                EQU        $01                    ; socket LED enable
  188. ;  Parameter block header definition - common for all PBs (48 bytes)
  189. ataPBHeader                RECORD 0
  190. ;  Start of cloned common header ataPBHdr 
  191. ataPBLink                 ds.l    1                ; offset: $0 (0)        ;  a pointer to the next entry in the queue    
  192. ataPBQType                 ds.w    1                ; offset: $4 (4)        ;  type byte for safety check
  193. ataPBVers                 ds.b    1                ; offset: $6 (6)        ;  -->: parameter block version number
  194. ataPBReserved             ds.b    1                ; offset: $7 (7)        ;  Reserved                                        
  195. ataPBReserved2             ds.l    1                ; offset: $8 (8)        ;  Reserved                                        
  196. ataPBCallbackPtr         ds.l    1                ; offset: $C (12)        ;  -->: Completion Routine Pointer    
  197. ataPBResult                 ds.w    1                ; offset: $10 (16)        ;  <--: Returned result                
  198. ataPBFunctionCode         ds.b    1                ; offset: $12 (18)        ;  -->: Manager Function Code 
  199. ataPBIOSpeed             ds.b    1                ; offset: $13 (19)        ;  -->: I/O Timing Class            
  200. ataPBFlags                 ds.w    1                ; offset: $14 (20)        ;  -->: Various control options    
  201. ataPBReserved3             ds.w    1                ; offset: $16 (22)        ;  Reserved                                        
  202. ataPBDeviceID             ds.l    1                ; offset: $18 (24)        ;  -->: Device identifier            
  203. ataPBTimeOut             ds.l    1                ; offset: $1C (28)        ;  -->: Transaction timeout value    in msec 
  204. ataPBClientPtr1             ds.l    1                ; offset: $20 (32)        ;  Client's storage Ptr 1     
  205. ataPBClientPtr2             ds.l    1                ; offset: $24 (36)        ;  Client's storage Ptr 2     
  206. ataPBState                 ds.w    1                ; offset: $28 (40)        ;  Reserved for Manager; Initialize to 0 
  207. ataPBSemaphores             ds.w    1                ; offset: $2A (42)        ;  Used internally by the manager
  208. ataPBReserved4             ds.l    1                ; offset: $2C (44)        ;  Reserved                                        
  209. ;  End of cloned common header ataPBHdr
  210. sizeof                     EQU *                    ; size:   $30 (48)
  211.                         ENDR
  212. ;  data request entry structure (16 bytes)
  213. IOBlock                    RECORD 0
  214. ataPBBuffer                 ds.l    1                ; offset: $0 (0)        ;  -->: Data buffer pointer
  215. ataPBByteCount             ds.l    1                ; offset: $4 (4)        ;  -->: Data transfer length in bytes
  216. sizeof                     EQU *                    ; size:   $8 (8)
  217.                         ENDR
  218. ;
  219. ; For ATAPI devices the ExtendedPB field is a pointer to the Command Packet
  220. ; record which exists of an array of words structured as follows…    <06/15/94>
  221. ;
  222. ATAPICmdPacket            RECORD 0
  223. atapiPacketSize             ds.w    1                ; offset: $0 (0)        ;  Size of command packet in bytes    <06/15/94>
  224. atapiCommandByte         ds.w    8                ; offset: $2 (2)        ;  The command packet itself    <06/15/94>
  225. sizeof                     EQU *                    ; size:   $12 (18)
  226.                         ENDR
  227. ;  Manager parameter block structure (96 bytes)
  228. ataIOPB                    RECORD 0
  229. ;  Start of cloned common header ataPBHdr
  230. ataPBLink                 ds.l    1                ; offset: $0 (0)        ;  a pointer to the next entry in the queue    
  231. ataPBQType                 ds.w    1                ; offset: $4 (4)        ;  type byte for safety check
  232. ataPBVers                 ds.b    1                ; offset: $6 (6)        ;  -->: parameter block version number; Must be 0x01
  233. ataPBReserved             ds.b    1                ; offset: $7 (7)        ;  Reserved                                        
  234. ataPBReserved2             ds.l    1                ; offset: $8 (8)        ;  Reserved                                        
  235. ataPBCallbackPtr         ds.l    1                ; offset: $C (12)        ;  -->: Completion Routine Pointer    
  236. ataPBResult                 ds.w    1                ; offset: $10 (16)        ;  <--: Returned result                
  237. ataPBFunctionCode         ds.b    1                ; offset: $12 (18)        ;  -->: Manager Function Code 
  238. ataPBIOSpeed             ds.b    1                ; offset: $13 (19)        ;  -->: I/O Timing Class            
  239. ataPBFlags                 ds.w    1                ; offset: $14 (20)        ;  -->: Various control options    
  240. ataPBReserved3             ds.w    1                ; offset: $16 (22)        ;  Reserved                                        
  241. ataPBDeviceID             ds.l    1                ; offset: $18 (24)        ;  -->: Device identifier            
  242. ataPBTimeOut             ds.l    1                ; offset: $1C (28)        ;  -->: Transaction timeout value    in msec 
  243. ataPBClientPtr1             ds.l    1                ; offset: $20 (32)        ;  Client's storage Ptr 1     
  244. ataPBClientPtr2             ds.l    1                ; offset: $24 (36)        ;  Client's storage Ptr 2     
  245. ataPBState                 ds.w    1                ; offset: $28 (40)        ;  Reserved for Manager; Initialize to 0 
  246. ataPBSemaphores             ds.w    1                ; offset: $2A (42)        ;  Used internally by the manager
  247. ataPBReserved4             ds.l    1                ; offset: $2C (44)        ;  Reserved                                        
  248. ;  End of cloned common header ataPBHdr
  249. ataPBStatusRegister         ds.b    1                ; offset: $30 (48)        ;  <--: Last ATA status image
  250. ataPBErrorRegister         ds.b    1                ; offset: $31 (49)        ;  <--: Last ATA error image-valid if lsb of Status set
  251. ataPBReserved5             ds.w    1                ; offset: $32 (50)        ;  Reserved
  252. ataPBLogicalBlockSize     ds.l    1                ; offset: $34 (52)        ;  -->: Blind transfer size per interrupt (Logical block size)
  253. ataPBBuffer                 ds.l    1                ; offset: $38 (56)        ;  -->: Data buffer pointer
  254. ataPBByteCount             ds.l    1                ; offset: $3C (60)        ;  -->: Data transfer length in bytes
  255. ataPBActualTxCount         ds.l    1                ; offset: $40 (64)        ;  <--: Actual transfer count
  256. ataPBReserved6             ds.l    1                ; offset: $44 (68)        ;  Reserved
  257. ataPBTaskFile             ds        ataTaskFile        ; offset: $48 (72)        ;  <->:    Device register images
  258. ataPBPacketPtr             ds.l    1                ; offset: $50 (80)        ;  -->: ATAPI packet command block pointer (valid with ATAPI bit set)
  259. ataPBReserved7             ds.w    6                ; offset: $54 (84)        ;  Reserved for future expansion
  260. sizeof                     EQU *                    ; size:   $60 (96)
  261.                         ENDR
  262. ;
  263. ; Parameter block structure for bus and Manager inquiry command
  264. ; Manager parameter block structure
  265. ;
  266. ataBusInquiry            RECORD 0
  267. ;  Start of cloned common header ataPBHdr
  268. ataPBLink                 ds.l    1                ; offset: $0 (0)        ;  a pointer to the next entry in the queue    
  269. ataPBQType                 ds.w    1                ; offset: $4 (4)        ;  type byte for safety check
  270. ataPBVers                 ds.b    1                ; offset: $6 (6)        ;  -->: parameter block version number; Must be 0x01
  271. ataPBReserved             ds.b    1                ; offset: $7 (7)        ;  Reserved                                        
  272. ataPBReserved2             ds.l    1                ; offset: $8 (8)        ;  Reserved                                        
  273. ataPBCallbackPtr         ds.l    1                ; offset: $C (12)        ;  -->: Completion Routine Pointer    
  274. ataPBResult                 ds.w    1                ; offset: $10 (16)        ;  <--: Returned result                
  275. ataPBFunctionCode         ds.b    1                ; offset: $12 (18)        ;  -->: Manager Function Code 
  276. ataPBIOSpeed             ds.b    1                ; offset: $13 (19)        ;  -->: I/O Timing Class            
  277. ataPBFlags                 ds.w    1                ; offset: $14 (20)        ;  -->: Various control options    
  278. ataPBReserved3             ds.w    1                ; offset: $16 (22)        ;  Reserved                                        
  279. ataPBDeviceID             ds.l    1                ; offset: $18 (24)        ;  -->: Device identifier            
  280. ataPBTimeOut             ds.l    1                ; offset: $1C (28)        ;  -->: Transaction timeout value    in msec 
  281. ataPBClientPtr1             ds.l    1                ; offset: $20 (32)        ;  Client's storage Ptr 1     
  282. ataPBClientPtr2             ds.l    1                ; offset: $24 (36)        ;  Client's storage Ptr 2     
  283. ataPBState                 ds.w    1                ; offset: $28 (40)        ;  Reserved for Manager; Initialize to 0 
  284. ataPBSemaphores             ds.w    1                ; offset: $2A (42)        ;  Used internally by the manager
  285. ataPBReserved4             ds.l    1                ; offset: $2C (44)        ;  Reserved                                        
  286. ;  End of cloned common header ataPBHdr
  287. ataEngineCount             ds.w    1                ; offset: $30 (48)        ;  <--: TBD; zero for now
  288. ataReserved1             ds.w    1                ; offset: $32 (50)        ;  Reserved
  289. ataDataTypes             ds.l    1                ; offset: $34 (52)        ;  <--: TBD; zero for now
  290. ataIOpbSize                 ds.w    1                ; offset: $38 (56)        ;  <--: Size of ATA IO PB
  291. ataMaxIOpbSize             ds.w    1                ; offset: $3A (58)        ;  <--: TBD; zero for now
  292. ataFeatureFlags             ds.l    1                ; offset: $3C (60)        ;  <--: TBD
  293. ataVersionNum             ds.b    1                ; offset: $40 (64)        ;  <--: Version number for the HBA
  294. ataHBAInquiry             ds.b    1                ; offset: $41 (65)        ;  <--: TBD; zero for now
  295. ataReserved2             ds.w    1                ; offset: $42 (66)        ;  Reserved
  296. ataHBAPrivPtr             ds.l    1                ; offset: $44 (68)        ;  <--: Ptr to HBA private data area
  297. ataHBAPrivSize             ds.l    1                ; offset: $48 (72)        ;  <--: Size of HBA private data area
  298. ataAsyncFlags             ds.l    1                ; offset: $4C (76)        ;  <--: Event capability for callback
  299. ataPIOModes                 ds.b    1                ; offset: $50 (80)        ;  <--: PIO modes supported (bit-significant)
  300. ataReserved3             ds.b    1                ; offset: $51 (81)        ;  Reserved
  301. ataSingleDMAModes         ds.b    1                ; offset: $52 (82)        ;  <--: Single Word DMA modes supported (b-sig)    
  302. ataMultiDMAModes         ds.b    1                ; offset: $53 (83)        ;  <--: Multiword DMA modes supported (b-sig)
  303. ataReserved4             ds.l    4                ; offset: $54 (84)        ;  Reserved
  304. ataReserved5             ds.b    16                ; offset: $64 (100)        ;  TBD
  305. ataHBAVendor             ds.b    16                ; offset: $74 (116)        ;  <--: Vendor ID of the HBA
  306. ataContrlFamily             ds.b    16                ; offset: $84 (132)        ;  <--: Family of ATA Controller
  307. ataContrlType             ds.b    16                ; offset: $94 (148)        ;  <--: Model number of controller
  308. ataXPTversion             ds.b    4                ; offset: $A4 (164)        ;  <--: version number of XPT
  309. ataReserved6             ds.b    4                ; offset: $A8 (168)        ;  Reserved
  310. ataHBAversion             ds.b    4                ; offset: $AC (172)        ;  <--: version number of HBA
  311. ataHBAslotType             ds.b    1                ; offset: $B0 (176)        ;  <--: type of slot
  312. ataHBAslotNum             ds.b    1                ; offset: $B1 (177)        ;  <--: slot number of the HBA
  313. ataReserved7             ds.w    1                ; offset: $B2 (178)        ;  Reserved
  314. ataReserved8             ds.l    1                ; offset: $B4 (180)        ;  Reserved
  315. sizeof                     EQU *                    ; size:   $B8 (184)
  316.                         ENDR
  317. ;  Manager parameter block structure
  318. ataMgrInquiry            RECORD 0
  319. ;  Start of cloned common header ataPBHdr
  320. ataPBLink                 ds.l    1                ; offset: $0 (0)        ;  a pointer to the next entry in the queue    
  321. ataPBQType                 ds.w    1                ; offset: $4 (4)        ;  type byte for safety check
  322. ataPBVers                 ds.b    1                ; offset: $6 (6)        ;  -->: parameter block version number; Must be 0x01
  323. ataPBReserved             ds.b    1                ; offset: $7 (7)        ;  Reserved                                        
  324. ataPBReserved2             ds.l    1                ; offset: $8 (8)        ;  Reserved                                        
  325. ataPBCallbackPtr         ds.l    1                ; offset: $C (12)        ;  -->: Completion Routine Pointer    
  326. ataPBResult                 ds.w    1                ; offset: $10 (16)        ;  <--: Returned result                
  327. ataPBFunctionCode         ds.b    1                ; offset: $12 (18)        ;  -->: Manager Function Code 
  328. ataPBIOSpeed             ds.b    1                ; offset: $13 (19)        ;  -->: I/O Timing Class            
  329. ataPBFlags                 ds.w    1                ; offset: $14 (20)        ;  -->: Various control options    
  330. ataPBReserved3             ds.w    1                ; offset: $16 (22)        ;  Reserved                                        
  331. ataPBDeviceID             ds.l    1                ; offset: $18 (24)        ;  -->: Device identifier            
  332. ataPBTimeOut             ds.l    1                ; offset: $1C (28)        ;  -->: Transaction timeout value    in msec 
  333. ataPBClientPtr1             ds.l    1                ; offset: $20 (32)        ;  Client's storage Ptr 1     
  334. ataPBClientPtr2             ds.l    1                ; offset: $24 (36)        ;  Client's storage Ptr 2     
  335. ataPBState                 ds.w    1                ; offset: $28 (40)        ;  Reserved for Manager; Initialize to 0 
  336. ataPBSemaphores             ds.w    1                ; offset: $2A (42)        ;  Used internally by the manager
  337. ataPBReserved4             ds.l    1                ; offset: $2C (44)        ;  Reserved                                        
  338. ;  End of cloned common header ataPBHdr
  339. ataMgrVersion             ds        NumVersion        ; offset: $30 (48)        ;  Manager Version information
  340. ataMgrPBVers             ds.b    1                ; offset: $34 (52)        ;  <--: Manager PB version number supported
  341. Reserved1                 ds.b    1                ; offset: $35 (53)        ;  Reserved
  342. ataBusCnt                 ds.w    1                ; offset: $36 (54)        ;  <--: Number of ATA buses in the system
  343. ataDevCnt                 ds.w    1                ; offset: $38 (56)        ;  <--: Total number of ATA devices detected
  344. ataPioModes                 ds.b    1                ; offset: $3A (58)        ;  <--: Maximum Programmed I/O speed mode supported
  345. Reserved2                 ds.b    1                ; offset: $3B (59)        ;  Reserved
  346. ataIOClkResolution         ds.w    1                ; offset: $3C (60)        ;  <--: IO Clock resolution in nsec (Not supported)
  347. ataSingleDMAModes         ds.b    1                ; offset: $3E (62)        ;  <--: Single Word DMA modes supported    
  348. ataMultiDMAModes         ds.b    1                ; offset: $3F (63)        ;  <--: Multiword DMA modes supported
  349. Reserved                 ds.w    16                ; offset: $40 (64)        ;  Reserved for future expansion
  350. sizeof                     EQU *                    ; size:   $60 (96)
  351.                         ENDR
  352. ;
  353. ; Parameter block structure for Abort command
  354. ; Manager parameter block structure
  355. ;
  356. ataAbort                RECORD 0
  357. ;  Start of cloned common header ataPBHdr
  358. ataPBLink                 ds.l    1                ; offset: $0 (0)        ;  a pointer to the next entry in the queue    
  359. ataPBQType                 ds.w    1                ; offset: $4 (4)        ;  type byte for safety check
  360. ataPBVers                 ds.b    1                ; offset: $6 (6)        ;  -->: parameter block version number; Must be 0x01
  361. ataPBReserved             ds.b    1                ; offset: $7 (7)        ;  Reserved                                        
  362. ataPBReserved2             ds.l    1                ; offset: $8 (8)        ;  Reserved                                        
  363. ataPBCallbackPtr         ds.l    1                ; offset: $C (12)        ;  -->: Completion Routine Pointer    
  364. ataPBResult                 ds.w    1                ; offset: $10 (16)        ;  <--: Returned result                
  365. ataPBFunctionCode         ds.b    1                ; offset: $12 (18)        ;  -->: Manager Function Code 
  366. ataPBIOSpeed             ds.b    1                ; offset: $13 (19)        ;  -->: I/O Timing Class            
  367. ataPBFlags                 ds.w    1                ; offset: $14 (20)        ;  -->: Various control options    
  368. ataPBReserved3             ds.w    1                ; offset: $16 (22)        ;  Reserved                                        
  369. ataPBDeviceID             ds.l    1                ; offset: $18 (24)        ;  -->: Device identifier            
  370. ataPBTimeOut             ds.l    1                ; offset: $1C (28)        ;  -->: Transaction timeout value    in msec 
  371. ataPBClientPtr1             ds.l    1                ; offset: $20 (32)        ;  Client's storage Ptr 1     
  372. ataPBClientPtr2             ds.l    1                ; offset: $24 (36)        ;  Client's storage Ptr 2     
  373. ataPBState                 ds.w    1                ; offset: $28 (40)        ;  Reserved for Manager; Initialize to 0 
  374. ataPBSemaphores             ds.w    1                ; offset: $2A (42)        ;  Used internally by the manager
  375. ataPBReserved4             ds.l    1                ; offset: $2C (44)        ;  Reserved                                        
  376. ;  End of cloned common header ataPBHdr
  377. ataAbortPB                 ds.l    1                ; offset: $30 (48)        ;  -->: Parameter block to be aborted
  378. Reserved                 ds.w    22                ; offset: $34 (52)        ;  Reserved for future expansion
  379. sizeof                     EQU *                    ; size:   $60 (96)
  380.                         ENDR
  381. ;  Manager parameter block structure
  382. ATAEventRec                RECORD 0
  383. ataEventCode             ds.w    1                ; offset: $0 (0)        ;  --> ATA event code
  384. ataPhysicalID             ds.w    1                ; offset: $2 (2)        ;  --> Physical drive reference
  385. ataDrvrContext             ds.l    1                ; offset: $4 (4)        ;  Context pointer saved by driver
  386. sizeof                     EQU *                    ; size:   $8 (8)
  387.                         ENDR
  388. ; typedef struct ATAEventRec *            ATAEventRecPtr
  389.  
  390. ;
  391. ; Parameter block structure for Driver Register command
  392. ; Manager parameter block structure
  393. ;
  394. ataDrvrRegister            RECORD 0
  395. ;  Start of cloned common header ataPBHdr
  396. ataPBLink                 ds.l    1                ; offset: $0 (0)        ;  a pointer to the next entry in the queue    
  397. ataPBQType                 ds.w    1                ; offset: $4 (4)        ;  type byte for safety check
  398. ataPBVers                 ds.b    1                ; offset: $6 (6)        ;  -->: parameter block version number; Must be 0x01
  399. ataPBReserved             ds.b    1                ; offset: $7 (7)        ;  Reserved                                        
  400. ataPBReserved2             ds.l    1                ; offset: $8 (8)        ;  Reserved                                        
  401. ataPBCallbackPtr         ds.l    1                ; offset: $C (12)        ;  -->: Completion Routine Pointer    
  402. ataPBResult                 ds.w    1                ; offset: $10 (16)        ;  <--: Returned result                
  403. ataPBFunctionCode         ds.b    1                ; offset: $12 (18)        ;  -->: Manager Function Code 
  404. ataPBIOSpeed             ds.b    1                ; offset: $13 (19)        ;  -->: I/O Timing Class            
  405. ataPBFlags                 ds.w    1                ; offset: $14 (20)        ;  -->: Various control options    
  406. ataPBReserved3             ds.w    1                ; offset: $16 (22)        ;  Reserved                                        
  407. ataPBDeviceID             ds.l    1                ; offset: $18 (24)        ;  -->: Device identifier            
  408. ataPBTimeOut             ds.l    1                ; offset: $1C (28)        ;  -->: Transaction timeout value    in msec 
  409. ataPBClientPtr1             ds.l    1                ; offset: $20 (32)        ;  Client's storage Ptr 1     
  410. ataPBClientPtr2             ds.l    1                ; offset: $24 (36)        ;  Client's storage Ptr 2     
  411. ataPBState                 ds.w    1                ; offset: $28 (40)        ;  Reserved for Manager; Initialize to 0 
  412. ataPBSemaphores             ds.w    1                ; offset: $2A (42)        ;  Used internally by the manager
  413. ataPBReserved4             ds.l    1                ; offset: $2C (44)        ;  Reserved                                        
  414. ;  End of cloned common header ataPBHdr
  415. ataDrvrRefNum             ds.w    1                ; offset: $30 (48)        ;  <->: Driver reference number
  416. ataDrvrFlags             ds.w    1                ; offset: $32 (50)        ;  -->: 1 = loader driver if ataPBDeviceID = -1 {PB2}
  417. ataDeviceNextID             ds.w    1                ; offset: $34 (52)        ;  <--: used to specified the next drive ID
  418. ataDrvrLoadPriv             ds.w    1                ; offset: $36 (54)        ;  Driver loader private storage
  419. ataEventHandler             ds.l    1                ; offset: $38 (56)        ;  <->: Pointer to ATA event callback routine {PB2}
  420. ataDrvrContext             ds.l    1                ; offset: $3C (60)        ;  <->: Context data saved by driver {PB2}
  421. ataEventMask             ds.l    1                ; offset: $40 (64)        ;  <->: Set to 1 for notification of event {PB2}
  422. Reserved                 ds.w    14                ; offset: $44 (68)        ;  Reserved for future expansion - from [21] {PB2}
  423. sizeof                     EQU *                    ; size:   $60 (96)
  424.                         ENDR
  425. ;  Parameter block structure for Modify driver event mask command
  426. ataModifyEventMask        RECORD 0
  427. ;  Start of cloned common header ataPBHdr
  428. ataPBLink                 ds.l    1                ; offset: $0 (0)        ;  a pointer to the next entry in the queue    
  429. ataPBQType                 ds.w    1                ; offset: $4 (4)        ;  type byte for safety check
  430. ataPBVers                 ds.b    1                ; offset: $6 (6)        ;  -->: parameter block version number; Must be 0x01
  431. ataPBReserved             ds.b    1                ; offset: $7 (7)        ;  Reserved                                        
  432. ataPBReserved2             ds.l    1                ; offset: $8 (8)        ;  Reserved                                        
  433. ataPBCallbackPtr         ds.l    1                ; offset: $C (12)        ;  -->: Completion Routine Pointer    
  434. ataPBResult                 ds.w    1                ; offset: $10 (16)        ;  <--: Returned result                
  435. ataPBFunctionCode         ds.b    1                ; offset: $12 (18)        ;  -->: Manager Function Code 
  436. ataPBIOSpeed             ds.b    1                ; offset: $13 (19)        ;  -->: I/O Timing Class            
  437. ataPBFlags                 ds.w    1                ; offset: $14 (20)        ;  -->: Various control options    
  438. ataPBReserved3             ds.w    1                ; offset: $16 (22)        ;  Reserved                                        
  439. ataPBDeviceID             ds.l    1                ; offset: $18 (24)        ;  -->: Device identifier            
  440. ataPBTimeOut             ds.l    1                ; offset: $1C (28)        ;  -->: Transaction timeout value    in msec 
  441. ataPBClientPtr1             ds.l    1                ; offset: $20 (32)        ;  Client's storage Ptr 1     
  442. ataPBClientPtr2             ds.l    1                ; offset: $24 (36)        ;  Client's storage Ptr 2     
  443. ataPBState                 ds.w    1                ; offset: $28 (40)        ;  Reserved for Manager; Initialize to 0 
  444. ataPBSemaphores             ds.w    1                ; offset: $2A (42)        ;  Used internally by the manager
  445. ataPBReserved4             ds.l    1                ; offset: $2C (44)        ;  Reserved                                        
  446. ;  End of cloned common header ataPBHdr
  447. ataModifiedEventMask     ds.l    1                ; offset: $30 (48)        ;  -->: new event mask value
  448. Reserved                 ds.w    22                ; offset: $34 (52)        ;  Reserved for future expansion
  449. sizeof                     EQU *                    ; size:   $60 (96)
  450.                         ENDR
  451. ;  'ataRegMask' field of the ataRegAccess definition
  452.  
  453. bATAAltSDevCValid                EQU        14                    ; bit number of alternate status/device cntrl valid bit
  454. bATAStatusCmdValid                EQU        7                    ; bit number of status/command valid bit
  455. bATASDHValid                    EQU        6                    ; bit number of ataTFSDH valid bit
  456. bATACylinderHiValid                EQU        5                    ; bit number of cylinder high valid bit
  457. bATACylinderLoValid                EQU        4                    ; bit number of cylinder low valid bit
  458. bATASectorNumValid                EQU        3                    ; bit number of sector number valid bit
  459. bATASectorCntValid                EQU        2                    ; bit number of sector count valid bit
  460. bATAErrFeaturesValid            EQU        1                    ; bit number of error/features valid bit
  461. bATADataValid                    EQU        0                    ; bit number of data valid bit
  462. mATAAltSDevCValid                EQU        $4000                ; alternate status/device control valid
  463. mATAStatusCmdValid                EQU        $80                    ; status/command valid
  464. mATASDHValid                    EQU        $40                    ; ataTFSDH valid
  465. mATACylinderHiValid                EQU        $20                    ; cylinder high valid
  466. mATACylinderLoValid                EQU        $10                    ; cylinder low valid
  467. mATASectorNumValid                EQU        $08                    ; sector number valid
  468. mATASectorCntValid                EQU        $04                    ; sector count valid
  469. mATAErrFeaturesValid            EQU        $02                    ; error/features valid
  470. mATADataValid                    EQU        $01                    ; data valid
  471. ;  Parameter block structure for device register access command
  472. ataRegValueUnion        RECORD 0
  473. ataByteRegValue             ds.b    1                ; offset: $0 (0)        ;  <->: Byte register value read or to be written
  474.                          ORG 0
  475. ataWordRegValue             ds.w    1                ; offset: $0 (0)        ;  <->: Word register value read or to be written
  476. sizeof                     EQU *                    ; size:   $2 (2)
  477.                         ENDR
  478. ;  Manager parameter block structure
  479. ataRegAccess            RECORD 0
  480. ;  Start of cloned common header ataPBHdr
  481. ataPBLink                 ds.l    1                ; offset: $0 (0)        ;  a pointer to the next entry in the queue    
  482. ataPBQType                 ds.w    1                ; offset: $4 (4)        ;  type byte for safety check
  483. ataPBVers                 ds.b    1                ; offset: $6 (6)        ;  -->: parameter block version number; Must be 0x01
  484. ataPBReserved             ds.b    1                ; offset: $7 (7)        ;  Reserved                                        
  485. ataPBReserved2             ds.l    1                ; offset: $8 (8)        ;  Reserved                                        
  486. ataPBCallbackPtr         ds.l    1                ; offset: $C (12)        ;  -->: Completion Routine Pointer    
  487. ataPBResult                 ds.w    1                ; offset: $10 (16)        ;  <--: Returned result                
  488. ataPBFunctionCode         ds.b    1                ; offset: $12 (18)        ;  -->: Manager Function Code 
  489. ataPBIOSpeed             ds.b    1                ; offset: $13 (19)        ;  -->: I/O Timing Class            
  490. ataPBFlags                 ds.w    1                ; offset: $14 (20)        ;  -->: Various control options    
  491. ataPBReserved3             ds.w    1                ; offset: $16 (22)        ;  Reserved                                        
  492. ataPBDeviceID             ds.l    1                ; offset: $18 (24)        ;  -->: Device identifier            
  493. ataPBTimeOut             ds.l    1                ; offset: $1C (28)        ;  -->: Transaction timeout value    in msec 
  494. ataPBClientPtr1             ds.l    1                ; offset: $20 (32)        ;  Client's storage Ptr 1     
  495. ataPBClientPtr2             ds.l    1                ; offset: $24 (36)        ;  Client's storage Ptr 2     
  496. ataPBState                 ds.w    1                ; offset: $28 (40)        ;  Reserved for Manager; Initialize to 0 
  497. ataPBSemaphores             ds.w    1                ; offset: $2A (42)        ;  Used internally by the manager
  498. ataPBReserved4             ds.l    1                ; offset: $2C (44)        ;  Reserved                                        
  499. ;  End of cloned common header ataPBHdr
  500. ataRegSelect             ds.w    1                ; offset: $30 (48)        ;  -->: Device Register Selector
  501. ;             DataReg            0    
  502. ;             ErrorReg(R) or FeaturesReg(W)    1
  503. ;             SecCntReg        2
  504. ;             SecNumReg        3
  505. ;             CylLoReg        4
  506. ;             CylHiReg        5
  507. ;             SDHReg            6
  508. ;             StatusReg(R) or CmdReg(W)        7
  509. ;             AltStatus(R) or DevCntr(W)    0E
  510. ataRegValue                 ds        ataRegValueUnion ; offset: $32 (50)
  511. ;  Following fields are valid only if ataRegSelect = 0xFFFF
  512. ataRegMask                 ds.w    1                ; offset: $34 (52)        ;  -->: mask for register(s) to update
  513. ;         bit 0 : data register valid
  514. ;         bit 1 : error/feaures register valid
  515. ;         bit 2 : sector count register valid
  516. ;         bit 3 : sector number register valid
  517. ;         bit 4 : cylinder low register valid
  518. ;         bit 5 : cylinder high register valid
  519. ;         bit 6 : ataTFSDH register valid
  520. ;         bit 7 : status/command register valid
  521. ;         bits 8 - 13 : reserved (set to 0)
  522. ;         bit 14: alternate status / device control reg valid
  523. ;          bit 15: reserved (set to 0)
  524. ataRegisterImage         ds        ataTaskFile        ; offset: $36 (54)        ;  <->: register images
  525. ataAltSDevCReg             ds.b    1                ; offset: $3E (62)        ;  <->: Alternate status(R) or Device Control(W) register image
  526. Reserved3                 ds.b    1                ; offset: $3F (63)        ;  Reserved
  527. Reserved                 ds.w    16                ; offset: $40 (64)        ;  Reserved for future expansion
  528. sizeof                     EQU *                    ; size:   $60 (96)
  529.                         ENDR
  530. ;  Manager parameter block structure    <DP03/10/94>
  531. ataIdentify                RECORD 0
  532. ;  Start of cloned common header ataPBHdr
  533. ataPBLink                 ds.l    1                ; offset: $0 (0)        ;  a pointer to the next entry in the queue    
  534. ataPBQType                 ds.w    1                ; offset: $4 (4)        ;  type byte for safety check
  535. ataPBVers                 ds.b    1                ; offset: $6 (6)        ;  -->: parameter block version number; Must be 0x01
  536. ataPBReserved             ds.b    1                ; offset: $7 (7)        ;  Reserved                                        
  537. ataPBReserved2             ds.l    1                ; offset: $8 (8)        ;  Reserved                                        
  538. ataPBCallbackPtr         ds.l    1                ; offset: $C (12)        ;  -->: Completion Routine Pointer    
  539. ataPBResult                 ds.w    1                ; offset: $10 (16)        ;  <--: Returned result                
  540. ataPBFunctionCode         ds.b    1                ; offset: $12 (18)        ;  -->: Manager Function Code 
  541. ataPBIOSpeed             ds.b    1                ; offset: $13 (19)        ;  -->: I/O Timing Class            
  542. ataPBFlags                 ds.w    1                ; offset: $14 (20)        ;  -->: Various control options    
  543. ataPBReserved3             ds.w    1                ; offset: $16 (22)        ;  Reserved                                        
  544. ataPBDeviceID             ds.l    1                ; offset: $18 (24)        ;  -->: Device identifier            
  545. ataPBTimeOut             ds.l    1                ; offset: $1C (28)        ;  -->: Transaction timeout value    in msec 
  546. ataPBClientPtr1             ds.l    1                ; offset: $20 (32)        ;  Client's storage Ptr 1     
  547. ataPBClientPtr2             ds.l    1                ; offset: $24 (36)        ;  Client's storage Ptr 2     
  548. ataPBState                 ds.w    1                ; offset: $28 (40)        ;  Reserved for Manager; Initialize to 0 
  549. ataPBSemaphores             ds.w    1                ; offset: $2A (42)        ;  Used internally by the manager
  550. ataPBReserved4             ds.l    1                ; offset: $2C (44)        ;  Reserved                                        
  551. ;  End of cloned common header ataPBHdr
  552. Reserved1                 ds.w    4                ; offset: $30 (48)        ;  Reserved.  These are used internally by the Manager
  553. ataPBBuffer                 ds.l    1                ; offset: $38 (56)        ;  Buffer for the identify data (512 bytes)
  554. Reserved2                 ds.w    12                ; offset: $3C (60)        ;  Used internally by the ATA Manager
  555. Reserved3                 ds.w    6                ; offset: $54 (84)        ;  Reserved for future expansion
  556. sizeof                     EQU *                    ; size:   $60 (96)
  557.                         ENDR
  558. ;  'ataConfigSetting' field of the Get/Set Device Configuration definition <8/6/94>
  559.  
  560. ATAPIpacketDRQ_bit                EQU        6                    ; bit number of ATAPI command packet DRQ option
  561. ATAPIpacketDRQ                    EQU        $40                    ; ATAPI command packet DRQ option
  562. ;  atapcValid field definition
  563.  
  564. bATApcAccessMode                EQU        0
  565. bATApcVcc                        EQU        1
  566. bATApcVpp1                        EQU        2
  567. bATApcVpp2                        EQU        3
  568. bATApcStatus                    EQU        4
  569. bATApcPin                        EQU        5
  570. bATApcCopy                        EQU        6
  571. bATApcConfigIndex                EQU        7
  572. bATApcLockUnlock                EQU        15
  573. mATApcAccessMode                EQU        $01
  574. mATApcVcc                        EQU        $02
  575. mATApcVpp1                        EQU        $04
  576. mATApcVpp2                        EQU        $08
  577. mATApcStatus                    EQU        $10
  578. mATApcPin                        EQU        $20
  579. mATApcCopy                        EQU        $40
  580. mATApcConfigIndex                EQU        $80
  581. mATApcLockUnlock                EQU        $8000
  582. ;  Device physical type & socket type indicator definition
  583.  
  584. kATADeviceUnknown                EQU        $00                    ; no device or type undetermined
  585. kATADeviceATA                    EQU        $01                    ; traditional ATA protocol device <7/29/94>
  586. kATADeviceATAPI                    EQU        $02                    ; ATAPI protocol device    <7/29/94>
  587. kATADevicePCMCIA                EQU        $03                    ; PCMCIA ATA device        <7/29/94>
  588. kATASocketInternal                EQU        $01                    ; Internal ATA socket
  589. kATASocketMB                    EQU        $02                    ; Media Bay socket
  590. kATASocketPCMCIA                EQU        $03                    ; PCMCIA socket
  591. kATAConfigReserved                EQU        7                    ; number of reserved words at the end
  592. ;
  593. ; Get/Set Device Configuration parameter block structure <8/6/94>
  594. ; Manager parameter block structure
  595. ;
  596. ataDevConfiguration        RECORD 0
  597. ;  Start of cloned common header ataPBHdr
  598. ataPBLink                 ds.l    1                ; offset: $0 (0)        ;  a pointer to the next entry in the queue    
  599. ataPBQType                 ds.w    1                ; offset: $4 (4)        ;  type byte for safety check
  600. ataPBVers                 ds.b    1                ; offset: $6 (6)        ;  -->: parameter block version number; Must be 0x01
  601. ataPBReserved             ds.b    1                ; offset: $7 (7)        ;  Reserved                                        
  602. ataPBReserved2             ds.l    1                ; offset: $8 (8)        ;  Reserved                                        
  603. ataPBCallbackPtr         ds.l    1                ; offset: $C (12)        ;  -->: Completion Routine Pointer    
  604. ataPBResult                 ds.w    1                ; offset: $10 (16)        ;  <--: Returned result                
  605. ataPBFunctionCode         ds.b    1                ; offset: $12 (18)        ;  -->: Manager Function Code 
  606. ataPBIOSpeed             ds.b    1                ; offset: $13 (19)        ;  -->: I/O Timing Class            
  607. ataPBFlags                 ds.w    1                ; offset: $14 (20)        ;  -->: Various control options    
  608. ataPBReserved3             ds.w    1                ; offset: $16 (22)        ;  Reserved                                        
  609. ataPBDeviceID             ds.l    1                ; offset: $18 (24)        ;  -->: Device identifier            
  610. ataPBTimeOut             ds.l    1                ; offset: $1C (28)        ;  -->: Transaction timeout value    in msec 
  611. ataPBClientPtr1             ds.l    1                ; offset: $20 (32)        ;  Client's storage Ptr 1     
  612. ataPBClientPtr2             ds.l    1                ; offset: $24 (36)        ;  Client's storage Ptr 2     
  613. ataPBState                 ds.w    1                ; offset: $28 (40)        ;  Reserved for Manager; Initialize to 0 
  614. ataPBSemaphores             ds.w    1                ; offset: $2A (42)        ;  Used internally by the manager
  615. ataPBReserved4             ds.l    1                ; offset: $2C (44)        ;  Reserved                                        
  616. ;  End of cloned common header ataPBHdr
  617. ataConfigSetting         ds.l    1                ; offset: $30 (48)        ;  <->: Configuration setting
  618. ;       Bits 3 - 0: Reserved
  619. ;       Bit 4: Reserved (allowLBAAccess)
  620. ;       Bit 5: Reserved (allowRWMultiple)
  621. ;       Bit 6: ATAPIpacketDRQ
  622. ;         1 = Check for Interrupt DRQ on ATAPI command packet DRQ
  623. ;         0 = Default: Check only for the assertion of command packet DRQ
  624. ;       Bits 31 - 7: Reserved
  625. ataPIOSpeedMode             ds.b    1                ; offset: $34 (52)        ;  <->: Device access speed in PIO Mode
  626. Reserved3                 ds.b    1                ; offset: $35 (53)        ;  Reserved to force word alignment
  627. atapcValid                 ds.w    1                ; offset: $36 (54)        ;  <->: Set when pcXXX fields are valid (atapcAccessMode - atapcConfigIndex)
  628. ;         bit 0 - atapcAccessMode field valid, when set
  629. ;         bit 1 - atapcVcc field valid, when set
  630. ;         bit 2 - atapcVpp1 field valid, when set
  631. ;         bit 3 - atapcVpp2 field valid, when set
  632. ;         bit 4 - atapcStatus field valid, when set
  633. ;         bit 5 - atapcPin field valid, when set
  634. ;         bit 6 - atapcCopy field valid, when set
  635. ;         bit 7 - atapcConfigIndex field valid, when set
  636. ;         bits 14-8 - Reserved
  637. ;         bit 15 - device lock/unlock request (write only)
  638. ataRWMultipleCount         ds.w    1                ; offset: $38 (56)        ;  Reserved for future (not supported yet)
  639. ataSectorsPerCylinder     ds.w    1                ; offset: $3A (58)        ;  Reserved for future (not supported yet)
  640. ataHeads                 ds.w    1                ; offset: $3C (60)        ;  Reserved for future (not supported yet)
  641. ataSectorsPerTrack         ds.w    1                ; offset: $3E (62)        ;  Reserved for future (not supported yet)
  642. ataSocketNumber             ds.w    1                ; offset: $40 (64)        ;  <--: Socket number used by the CardServices
  643. ;         0xFF = socket number invalid (Not a CardServices device)
  644. ;         other = socket number of the device
  645. ataSocketType             ds.b    1                ; offset: $42 (66)        ;  <--: Specifies the socket type (get config only)
  646. ;         00 = Unknown socket
  647. ;          01 = Internal ATA bus
  648. ;         02 = Media Bay
  649. ;         03 = PCMCIA
  650. ataDeviceType             ds.b    1                ; offset: $43 (67)        ;  <--: Specifies the device type (get config only)
  651. ;         00 = Unknown device
  652. ;         01 = standard ATA device (HD)
  653. ;         02 = ATAPI device
  654. ;         03 = PCMCIA ATA device
  655. atapcAccessMode             ds.b    1                ; offset: $44 (68)        ;  <->: Access mode: Memory vs. I/O (PCMCIA only)
  656. atapcVcc                 ds.b    1                ; offset: $45 (69)        ;  <->: Voltage in tenths of a volt (PCMCIA only)
  657. atapcVpp1                 ds.b    1                ; offset: $46 (70)        ;  <->: Voltage in tenths of a volt (PCMCIA only)
  658. atapcVpp2                 ds.b    1                ; offset: $47 (71)        ;  <->: Voltage in tenths of a volt (PCMCIA only)
  659. atapcStatus                 ds.b    1                ; offset: $48 (72)        ;  <->: Card Status register setting (PCMCIA only)
  660. atapcPin                 ds.b    1                ; offset: $49 (73)        ;  <->: Card Pin register setting (PCMCIA only)
  661. atapcCopy                 ds.b    1                ; offset: $4A (74)        ;  <->: Card Socket/Copy register setting (PCMCIA only)
  662. atapcConfigIndex         ds.b    1                ; offset: $4B (75)        ;  <->: Card Option register setting (PCMCIA only)
  663. ataSingleDMASpeed         ds.b    1                ; offset: $4C (76)        ;  <->: Single Word DMA Timing Class
  664. ataMultiDMASpeed         ds.b    1                ; offset: $4D (77)        ;  <->: Multiple Word DMA Timing Class
  665. ataPIOCycleTime             ds.w    1                ; offset: $4E (78)        ;  <->:Cycle time for PIO mode
  666. ataMultiCycleTime         ds.w    1                ; offset: $50 (80)        ;  <->:Cycle time for Multiword DMA mode
  667. Reserved1                 ds.w    7                ; offset: $52 (82)        ;  Reserved for future
  668. sizeof                     EQU *                    ; size:   $60 (96)
  669.                         ENDR
  670. ;  Get Card Location Icon/Text    <SM4>
  671.  
  672. kATALargeIconHFS                EQU        $0001                ; Large B&W icon with mask (HFS)
  673. kATALargeIconProDOS                EQU        $0081                ; Large B&W icon with mask (ProDOS)
  674. ;  Manager parameter block structure
  675. ataLocationData            RECORD 0
  676. ;  Start of cloned common header ataPBHdr
  677. ataPBLink                 ds.l    1                ; offset: $0 (0)        ;  a pointer to the next entry in the queue    
  678. ataPBQType                 ds.w    1                ; offset: $4 (4)        ;  type byte for safety check
  679. ataPBVers                 ds.b    1                ; offset: $6 (6)        ;  -->: parameter block version number; Must be 0x01
  680. ataPBReserved             ds.b    1                ; offset: $7 (7)        ;  Reserved                                        
  681. ataPBReserved2             ds.l    1                ; offset: $8 (8)        ;  Reserved                                        
  682. ataPBCallbackPtr         ds.l    1                ; offset: $C (12)        ;  -->: Completion Routine Pointer    
  683. ataPBResult                 ds.w    1                ; offset: $10 (16)        ;  <--: Returned result                
  684. ataPBFunctionCode         ds.b    1                ; offset: $12 (18)        ;  -->: Manager Function Code 
  685. ataPBIOSpeed             ds.b    1                ; offset: $13 (19)        ;  -->: I/O Timing Class            
  686. ataPBFlags                 ds.w    1                ; offset: $14 (20)        ;  -->: Various control options    
  687. ataPBReserved3             ds.w    1                ; offset: $16 (22)        ;  Reserved                                        
  688. ataPBDeviceID             ds.l    1                ; offset: $18 (24)        ;  -->: Device identifier            
  689. ataPBTimeOut             ds.l    1                ; offset: $1C (28)        ;  -->: Transaction timeout value    in msec 
  690. ataPBClientPtr1             ds.l    1                ; offset: $20 (32)        ;  Client's storage Ptr 1     
  691. ataPBClientPtr2             ds.l    1                ; offset: $24 (36)        ;  Client's storage Ptr 2     
  692. ataPBState                 ds.w    1                ; offset: $28 (40)        ;  Reserved for Manager; Initialize to 0 
  693. ataPBSemaphores             ds.w    1                ; offset: $2A (42)        ;  Used internally by the manager
  694. ataPBReserved4             ds.l    1                ; offset: $2C (44)        ;  Reserved                                        
  695. ;  End of cloned common header ataPBHdr
  696. ataIconType                 ds.w    1                ; offset: $30 (48)        ;  -->: icon type specifier
  697. ;          1 = Large B&W icon with mask (256 bytes)
  698. ;         0x81 = Same as 1, but ProDOS icon
  699. ataIconReserved             ds.w    1                ; offset: $32 (50)        ;  Reserved to be longword aligned
  700. ataLocationIconPtr         ds.l    1                ; offset: $34 (52)        ;  -->: Icon Data buffer pointer
  701. ataLocationStringPtr     ds.l    1                ; offset: $38 (56)        ;  -->: Icon String buffer pointer
  702. Reserved1                 ds.w    18                ; offset: $3C (60)        ;  Reserved for future
  703. sizeof                     EQU *                    ; size:   $60 (96)
  704.                         ENDR
  705. ;  ataOSType available
  706.  
  707. kATAddTypeMacOS                    EQU        $0001                ; Blue Mac O/S ddType value
  708. ;  The parameter block definition for all other ATA Manager functions.
  709. ataGeneric                RECORD 0
  710. ;  Start of cloned common header ataPBHdr
  711. ataPBLink                 ds.l    1                ; offset: $0 (0)        ;  a pointer to the next entry in the queue    
  712. ataPBQType                 ds.w    1                ; offset: $4 (4)        ;  type byte for safety check
  713. ataPBVers                 ds.b    1                ; offset: $6 (6)        ;  -->: parameter block version number; Must be 0x01
  714. ataPBReserved             ds.b    1                ; offset: $7 (7)        ;  Reserved                                        
  715. ataPBReserved2             ds.l    1                ; offset: $8 (8)        ;  Reserved                                        
  716. ataPBCallbackPtr         ds.l    1                ; offset: $C (12)        ;  -->: Completion Routine Pointer    
  717. ataPBResult                 ds.w    1                ; offset: $10 (16)        ;  <--: Returned result                
  718. ataPBFunctionCode         ds.b    1                ; offset: $12 (18)        ;  -->: Manager Function Code 
  719. ataPBIOSpeed             ds.b    1                ; offset: $13 (19)        ;  -->: I/O Timing Class            
  720. ataPBFlags                 ds.w    1                ; offset: $14 (20)        ;  -->: Various control options    
  721. ataPBReserved3             ds.w    1                ; offset: $16 (22)        ;  Reserved                                        
  722. ataPBDeviceID             ds.l    1                ; offset: $18 (24)        ;  -->: Device identifier            
  723. ataPBTimeOut             ds.l    1                ; offset: $1C (28)        ;  -->: Transaction timeout value    in msec 
  724. ataPBClientPtr1             ds.l    1                ; offset: $20 (32)        ;  Client's storage Ptr 1     
  725. ataPBClientPtr2             ds.l    1                ; offset: $24 (36)        ;  Client's storage Ptr 2     
  726. ataPBState                 ds.w    1                ; offset: $28 (40)        ;  Reserved for Manager; Initialize to 0 
  727. ataPBSemaphores             ds.w    1                ; offset: $2A (42)        ;  Used internally by the manager
  728. ataPBReserved4             ds.l    1                ; offset: $2C (44)        ;  Reserved                                        
  729. ;  End of cloned common header ataPBHdr
  730. Reserved                 ds.w    24                ; offset: $30 (48)        ;  Reserved for future
  731. sizeof                     EQU *                    ; size:   $60 (96)
  732.                         ENDR
  733. ataPB                    RECORD 0
  734. ataIOParamBlock             ds        ataIOPB            ; offset: $0 (0)        ;  parameter block for I/O
  735.                          ORG 0
  736. ataBIParamBlock             ds        ataBusInquiry    ; offset: $0 (0)        ;  parameter block for bus inquiry
  737.                          ORG 0
  738. ataMIParamBlock             ds        ataMgrInquiry    ; offset: $0 (0)        ;  parameter block for Manager inquiry
  739.                          ORG 0
  740. ataAbortParamBlock         ds        ataAbort        ; offset: $0 (0)        ;  parameter block for abort
  741.                          ORG 0
  742. ataDRParamBlock             ds        ataDrvrRegister ; offset: $0 (0)        ;  parameter block for driver register
  743.                          ORG 0
  744. ataMEParamBlock             ds        ataModifyEventMask ; offset: $0 (0)        ;  parameter block for event mask modify
  745.                          ORG 0
  746. ataRAParamBlock             ds        ataRegAccess    ; offset: $0 (0)        ;  parameter block for register access
  747.                          ORG 0
  748. ataDIParamBlock             ds        ataIdentify        ; offset: $0 (0)        ;  parameter block for drive identify
  749.                          ORG 0
  750. ataDCParamBlock             ds        ataDevConfiguration ; offset: $0 (0)    ;  parameter block for device configuration
  751.                          ORG 0
  752. ataLDParamBlock             ds        ataLocationData ; offset: $0 (0)        ;  parameter block for location icon data
  753. ; ataManagerInit    ataInitParamBlock;        // parameter block for Manager initialization
  754. ; ataManagerShutDn    ataSDParamBlock;        // parameter block for Manager shutdown
  755. ; ataDrvrLoad        ataDLParamBlock;        // parameter block for Driver loading
  756.                          ORG 0
  757. ataGenericParamBlock     ds        ataGeneric        ; offset: $0 (0)        ;  parameter block for all other functions
  758.                          ORG 184
  759. sizeof                     EQU *                    ; size:   $B8 (184)
  760.                         ENDR
  761. ;  The ATA Event codes…
  762.  
  763. kATANullEvent                    EQU        $00                    ; Just kidding -- nothing happened
  764. kATAOnlineEvent                    EQU        $01                    ; An ATA device has come online
  765. kATAOfflineEvent                EQU        $02                    ; An ATA device has gone offline
  766. kATARemovedEvent                EQU        $03                    ; An ATA device has been removed from the bus
  767. kATAResetEvent                    EQU        $04                    ; Someone gave a hard reset to the drive
  768. kATAOfflineRequest                EQU        $05                    ; Someone requesting to offline the drive
  769. kATAEjectRequest                EQU        $06                    ; Someone requesting to eject the drive
  770. kATAUpdateEvent                    EQU        $07                    ; Potential configuration change reported by CardServices <SM4>
  771.                                                             ; The following describes bit definitions in the eventMask field of ataDrvrRegister
  772. bATANullEvent                    EQU        $01                    ; null event bit
  773. bATAOnlineEvent                    EQU        $02                    ; online event bit
  774. bATAOfflineEvent                EQU        $04                    ; offline event bit
  775. bATARemovedEvent                EQU        $08                    ; removed event bit
  776. bATAResetEvent                    EQU        $10                    ; reset event bit
  777. bATAOfflineRequest                EQU        $20                    ; offline request event bit
  778. bATAEjectRequest                EQU        $40                    ; eject request event bit
  779. bATAUpdateEvent                    EQU        $80                    ; configuration update event bit
  780. ;
  781. ; pascal SInt16 ataManager(ataPB *pb)
  782. ;
  783.     IF ¬ GENERATINGCFM THEN
  784.         _ataManager:    OPWORD    $AAF1
  785.     ELSE
  786.         IMPORT_CFM_FUNCTION ataManager
  787.     ENDIF
  788.  
  789. ;  Device Error codes: 0xDB42 - 0xDB5F    
  790.  
  791. ATABaseErrCode                    EQU        -9406                ; Base error code - 0xDB42    
  792. ioPending                        EQU        1                    ; Asynch I/O in progress status
  793. AT_NRdyErr                        EQU        -9405                ; 0xDB43: Drive not Ready 
  794. AT_IDNFErr                        EQU        -9404                ; 0xDB44: ID not found 
  795. AT_DMarkErr                        EQU        -9403                ; 0xDB45: Data mark not found 
  796. AT_BadBlkErr                    EQU        -9402                ; 0xDB46: Bad Block 
  797. AT_CorDataErr                    EQU        -9401                ; 0xDB47: Data was corrected 
  798. AT_UncDataErr                    EQU        -9400                ; 0xDB48: Data was not corrected 
  799. AT_SeekErr                        EQU        -9399                ; 0xDB49: Seek error 
  800. AT_WrFltErr                        EQU        -9398                ; 0xDB4A: Write fault 
  801. AT_RecalErr                        EQU        -9397                ; 0xDB4B: Recalibrate failed 
  802. AT_AbortErr                        EQU        -9396                ; 0xDB4C: Command aborted by drive 
  803. AT_MCErr                        EQU        -9394                ; 0xDB4E: Media Changed error
  804. ATAPICheckErr                    EQU        -9393                ; 0xDB4F: ATAPI Check condition <06/15/94>
  805.                                                             ; System error codes...Custom Driver Error Codes 0xDB60 - 0xDB6F
  806. DRVRCantAllocate                EQU        -9376                ; 0xDB60: Allocation error during initialization
  807. NoATAMgr                        EQU        -9375                ; 0xDB61: MgrInquiry failed => No ATA Manager
  808. ATAInitFail                        EQU        -9374                ; 0xDB62: Mgr Initialization failed
  809. ATABufFail                        EQU        -9373                ; 0xDB63: Device buffer test failure
  810. ATADevUnsupported                EQU        -9372                ; 0xDB64: Device type not supported
  811. ATAEjectDrvErr                    EQU        -9371                ; 0xDB65: Could not eject the drive
  812.                                                             ; Manager Error Codes 0xDB70 - 0xDB8F
  813. ATAMgrNotInitialized            EQU        -9360                ; 0xDB70: Mgr has not been initialized
  814. ATAPBInvalid                    EQU        -9359                ; 0xDB71: The bus base address couldn't be found
  815. ATAFuncNotSupported                EQU        -9358                ; 0xDB72: An unknown function code specified
  816. ATABusy                            EQU        -9357                ; 0xDB73: Selected device is busy
  817. ATATransTimeOut                    EQU        -9356                ; 0xDB74: Transaction timeout detected
  818. ATAReqInProg                    EQU        -9355                ; 0xDB75: Channel busy; channel is processing another cmd
  819. ATAUnknownState                    EQU        -9354                ; 0xDB76: Device status register reflects an unknown state
  820. ATAQLocked                        EQU        -9353                ; 0xDB77: I/O Queue is locked due to previous I/O error.
  821. ATAReqAborted                    EQU        -9352                ; 0xDB78: The I/O queue entry was aborted due to an abort req.
  822.                                                             ;            or due to Manager shutdown.
  823. ATAUnableToAbort                EQU        -9351                ; 0xDB79: The I/O queue entry could not be aborted.
  824. ATAAbortedDueToRst                EQU        -9350                ; 0xDB7A: Request aborted due to a device reset command.
  825. ATAPIPhaseErr                    EQU        -9349                ; 0xDB7B: Unexpected phase - •••IS THIS VALID ERROR??? <06/15/94>
  826. ATAPITxCntErr                    EQU        -9348                ; 0xDB7C: Overrun/Underrun condition detected
  827. ATANoClientErr                    EQU        -9347                ; 0xDB7D: No client present to handle the event
  828. ATAInternalErr                    EQU        -9346                ; 0xDB7E: MagnumOpus returned an error
  829. ATABusErr                        EQU        -9345                ; 0xDB7F: Bus error detected on I/O    
  830. AT_NoAddrErr                    EQU        -9344                ; 0xDB80: Invalid AT base adress 
  831. DriverLocked                    EQU        -9343                ; 0xDB81: Current driver must be removed before adding another
  832. CantHandleEvent                    EQU        -9342                ; 0xDB82: Particular event couldn't be handled (call others)
  833. ATAMgrMemoryErr                    EQU        -9341                ; 0xDB83: Manager memory allocation error    
  834. ATASDFailErr                    EQU        -9340                ; 0xDB84: Shutdown failure                
  835. ATAXferParamErr                    EQU        -9339                ; 0xDB85: I/O xfer parameters inconsistent 
  836. ATAXferModeErr                    EQU        -9338                ; 0xDB86: I/O xfer mode not supported 
  837. ATAMgrConsistencyErr            EQU        -9337                ; 0XDB87: Manager detected internal inconsistency. 
  838. ATADmaXferErr                    EQU        -9336                ; 0XDB88: fatal error in DMA side of transfer 
  839.                                                             ; Driver loader error Codes 0xDB90 - 0xDBA5
  840. ATAInvalidDrvNum                EQU        -9328                ; 0xDB90: Invalid drive number from event
  841. ATAMemoryErr                    EQU        -9327                ; 0xDB91: Memory allocation error
  842. ATANoDDMErr                        EQU        -9326                ; 0xDB92: No DDM found on media    
  843. ATANoDriverErr                    EQU        -9325                ; 0xDB93: No driver found on the media    
  844. ;  ------------------------    Version 1 definition -------------------------------    
  845.  
  846. v1ATABaseErrCode                EQU        $0700                ; This needs a home somewhere
  847. v1AT_NRdyErr                    EQU        $FFFFF901            ; 0xF901: -0x1DBE 
  848. v1AT_IDNFErr                    EQU        $FFFFF904            ; 0xF904: -0x1DC0 
  849. v1AT_DMarkErr                    EQU        $FFFFF905            ; 0xF905: -0x1DC0 
  850. v1AT_BadBlkErr                    EQU        $FFFFF906            ; 0xF906: -0x1DC0 
  851. v1AT_CorDataErr                    EQU        $FFFFF907            ; 0xF907: -0x1DC0 
  852. v1AT_UncDataErr                    EQU        $FFFFF908            ; 0xF908: -0x1DC0 
  853. v1AT_SeekErr                    EQU        $FFFFF909            ; 0xF909: -0x1DC0 
  854. v1AT_WrFltErr                    EQU        $FFFFF90A            ; 0xF90A: -0x1DC0 
  855. v1AT_RecalErr                    EQU        $FFFFF90B            ; 0xF90B: -0x1DC0 
  856. v1AT_AbortErr                    EQU        $FFFFF90C            ; 0xF90C: -0x1DC0 
  857. v1AT_NoAddrErr                    EQU        $FFFFF90D            ; 0xF90D: -0x1D8D 
  858. v1AT_MCErr                        EQU        $FFFFF90E            ; 0xF90E: -0x1DC0
  859.                                                             ; System error codes...Custom Driver Error Codes
  860. v1DRVRCantAllocate                EQU        -1793                ; 0xF8FF: -0x1D9F
  861. v1NoATAMgr                        EQU        -1794                ; 0xF8FE: -0x1D9D
  862. v1ATAInitFail                    EQU        -1795                ; 0xF8FD: -0x1D9B
  863. v1ATABufFail                    EQU        -1796                ; 0xF8FC: -0x1D99
  864. v1ATADevUnsupported                EQU        -1797                ; 0xF8FB: -0x1c97
  865.                                                             ; Manager Error Codes
  866. v1ATAMgrNotInitialized            EQU        -1802                ; 0xF8F6: -0x1D86
  867. v1ATAPBInvalid                    EQU        -1803                ; 0xF8F5: -0x1D84
  868. v1ATAFuncNotSupported            EQU        -1804                ; 0xF8F4: -0x1D82
  869. v1ATABusy                        EQU        -1805                ; 0xF8F3: -0x1D80
  870. v1ATATransTimeOut                EQU        -1806                ; 0xF8F2: -0x1D7E
  871. v1ATAReqInProg                    EQU        -1807                ; 0xF8F1: -0x1D7C
  872. v1ATAUnknownState                EQU        -1808                ; 0xF8F0: -0x1D7A
  873. v1ATAQLocked                    EQU        -1809                ; 0xF8EF: -0x1D78
  874. v1ATAReqAborted                    EQU        -1810                ; 0xF8EE: -0x1D76
  875. v1ATAUnableToAbort                EQU        -1811                ; 0xF8ED: -0x1D74
  876. v1ATAAbortedDueToRst            EQU        -1812                ; 0xF8EC: -0x1D72
  877.     ENDIF ; __ATA__ 
  878.  
  879.